package com.itheima.mOop;

/*
    手机
 */
public class Phone01 {
    private String brand;
    private int price;
    private String color;
    //建立构造

    public Phone01() {
    }

    public Phone01(String brand, int price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void call() {
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机打电话....");
    }

    public void sendMessage() {
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机发短信....");
    }
}

class TestPhone01 {
    public static void main(String[] args) {
        Phone01 p1 = new Phone01();
        p1.setBrand("小米");
        p1.setPrice(3998);
        p1.setColor("黑色");
        p1.call();
        p1.sendMessage();
    }
}
